package com.example.houqin_oa.controller;

import com.example.comment_oa.pojos.rear.Noet;
import com.example.comment_oa.response.AjaxResponse;
import com.example.houqin_oa.service.NoetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:公共物品盘点
 * @Author:陈旭良
 * @Documents_And_Settings:liang
 * @Date:2022-11-06 21:14
 * @Entry_Name:my_springcloud_project01cangku
 */
@RestController
@CrossOrigin
@RequestMapping("/houqinOa")
public class NoetController {
    @Autowired
    NoetService noetService;

    //新增公共盘点记录
    @PostMapping("/noet/AddInventory")
    public AjaxResponse AddInventory(@RequestBody Noet noet){
        return AjaxResponse.success(noetService.AddInventory(noet));
    }

    //新增仓库盘点记录
    @PostMapping("/noet/AddLookUp")
    public AjaxResponse AddLookUp(@RequestBody Noet noet){
        return AjaxResponse.success(noetService.AddLookUp(noet));
    }

    //查询盘点记录
    @PostMapping("/noet/AllInventory")
    public AjaxResponse AllInventory(@RequestBody Noet noet){
        System.err.println(noet);
        return AjaxResponse.success(noetService.AllInventory(noet));
    }

}
